package cn.edu.scau.cmi.liujiaming.chapter06;

public class Triangle extends Geometry{
	double a,b,c;
	Triangle(){
		
	}
	Triangle(double a,double b,double c){
		this.a=a;
		this.b=b;
		this.c=c;
	}
	public double getArea() {
		double area,p;
		p=(a+b+c)/2;
		area=Math.sqrt(p*(p-a)*(p-b)*(p-c));
		return area;
	}

}
